package com.controller;

import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.model.Tianqi;
import com.service.TianqiService;

import java.util.List;

@Api("天气信息")
@RestController
@RequestMapping("/tianqi")
public class TianqiController {
    @Autowired
    private TianqiService tianqiService;

    //解决跨越问题
    @CrossOrigin
    @RequestMapping(value = "/getAll", produces = "application/json;charset=utf-8", method = RequestMethod.PUT)
    public List<Tianqi> getAlltianqi(Tianqi tianqi) {
        System.out.println("进入用户查询方法");
        return tianqiService.getAlltianqi(tianqi);
    }
}
